โ– humdrum codex / glint v1.0.2
license AGPL-3.0
1.7 KB raw
id
TASK-007
title
Find in document
status
๐Ÿ Done
assignee
created_date
2026-06-29 16:26
updated_date
2026-06-29 20:46
labels
feature, release-1
dependencies
priority
high
ordinal
7000

Description

Release 1. In-file search (Ctrl+F is the picker, so use another key e.g. Ctrl+G or '/'). A find bar (reuse the textinput) takes a query; matches are highlighted; Enter / n next, Shift+Enter / N previous, wrapping around; case-insensitive by default; Esc closes and returns to the editor; the viewport scrolls to keep the active match visible. Live-update matches as you type.

Acceptance Criteria

Implementation Notes

Implemented. Editor: internal/editor/find.go (case-insensitive non-overlapping substring matches, active-match cursor parking + scroll-to-match, all-matches highlight in View; Highlight bg for matches, SelBg for the active one). App: ModeFind + find bar (textinput), opened with Ctrl+G (Ctrl+F is the picker). Enter/Down = next, Shift+Tab/Up = prev (wrapping); Esc closes and clears. Note: description suggested Shift+Enter/N for prev and n for next, but terminals can't distinguish Shift+Enter and n/N collide with live query typing, so prev is Shift+Tab/Up and next is Enter/Down. 16 new tests (12 editor, 4 app); all green, go vet + golangci-lint clean.